package filter;


import javax.servlet.*;
import java.io.IOException;

public class MyFilter1 implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
//        servletRequest.setCharacterEncoding("utf-8");
//        System.out.println("请求消息已经被第一个过滤器拦截，现在正准备将请求转发给下一个过滤器或资源");
        filterChain.doFilter(servletRequest,servletResponse);
//        System.out.println("请求已经到达目的地，返回消息到达了过滤器1");
    }

    @Override
    public void destroy() {

    }
}
